﻿using System;

namespace SapaFinance.Domain.Model
{
    public class Payment : AbstractEntity
    {
        public Payment(User user)
        {
            CreatedBy = new Identity(user);
        }

        public Identity CreatedBy { get; private set; }
        public int Unique { get; set; }
        public int Number { get; set; }
        public DateTime PaymentDate { get; set; }
        public PaymentType PaymentType { get; private set; }
        public Corporation Payer { get; private set; }
        public Corporation Payee { get; private set; }

        public void SetPayment(PaymentType payment)
        {
            PaymentType = payment;
        }

        public void SetPayee(Corporation payee)
        {
            Payee = payee;
        }

        public void SetPayer(Corporation payer)
        {
            Payer = payer;
        }
    }
}